using System;
using System.ComponentModel.DataAnnotations;
using DesktopWidgetApp.Shared;

namespace DesktopWidgetApp.Server.Models
{
    /// <summary>
    /// 服务器端状态实体
    /// 继承自共享的Status类，并添加数据库相关的属性和配置
    /// </summary>
    public class ServerStatus
    {
        /// <summary>
        /// 状态ID
        /// </summary>
        [Key]
        public Guid Id { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        [Required]
        public Guid UserId { get; set; }

        /// <summary>
        /// 状态类型
        /// </summary>
        [Required]
        public string StatusType { get; set; }

        /// <summary>
        /// 自定义状态文本
        /// </summary>
        public string CustomText { get; set; }

        /// <summary>
        /// 状态颜色
        /// </summary>
        public string Color { get; set; }

        /// <summary>
        /// 状态开始时间
        /// </summary>
        [Required]
        public DateTime StartTime { get; set; }

        /// <summary>
        /// 状态结束时间（为空表示当前状态）
        /// </summary>
        public DateTime? EndTime { get; set; }

        /// <summary>
        /// 是否免打扰
        /// </summary>
        public bool IsDoNotDisturb { get; set; }

        /// <summary>
        /// 最后更新时间
        /// </summary>
        [Required]
        public DateTime LastUpdated { get; set; }
    }
}